home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 2000 July / macformat-092.iso / Fireworks 3 / Settings / Commands / Creative / Convert to Sepia Tone.jsf < prev    next >
Encoding:
Text File  |  1999-11-19  |  1.0 KB  |  49 lines

  1. // Copyright (c) 1999 Macromedia. All rights reserved.
  2.  
  3. var pixel = fw.getDocumentDOM().getPixelMask();
  4.  
  5. // Figure out if there is a selection that the user made
  6. if (pixel == null){
  7.  
  8.     // Now run the filters
  9.     fw.getDocumentDOM().applyEffects(
  10.         { 
  11.             category:"Untitled",
  12.             effects:[ 
  13.                 { 
  14.                     EffectIsVisible:true,
  15.                     EffectMoaID:"{3439b08d-1922-11d3-9bde00e02910d580}",
  16.                     MB_filter_preview_tile_size:"-1 -1",
  17.                     category:"Adjust Color",
  18.                     hls_colorize:true,
  19.                     hue_amount:27,
  20.                     lightness_amount:0,
  21.                     name:"Hue/Saturation...",
  22.                     saturation_amount:20 
  23.                 } 
  24.             ],
  25.             name:"Untitled" 
  26.         }
  27.     );
  28. } else{
  29.     // Run the filters on the user selected pixels
  30.     fw.getDocumentDOM().filterSelection(
  31.         { 
  32.             EffectMoaID:"{3439b08d-1922-11d3-9bde00e02910d580}",
  33.             hls_colorize:true,
  34.             hue_amount:0,
  35.             lightness_amount:0,
  36.             saturation_amount:0 
  37.         }
  38.     );
  39.     fw.getDocumentDOM().filterSelection(
  40.         { 
  41.             EffectMoaID:"{3439b08d-1922-11d3-9bde00e02910d580}",
  42.             hls_colorize:true,
  43.             hue_amount:30,
  44.             lightness_amount:0,
  45.             saturation_amount:20 
  46.         }
  47.     );
  48. }
  49.